const {Strategy,Snooper} =  require('./Strategy')

class Protocol{
    /**
     * @param {Strategy} strategy 
     */
    constructor(strategy){
        this.strategy = strategy
    }

    busRd(host){
        this.strategy.busRd(host)
    }

    busRdX(host){
        this.strategy.busRdX(host)
    }

    flush(host){
        this.strategy.flush(host)
    }

    use(strategy){
        this.strategy = strategy
    }
}

module.exports = new Protocol(new Snooper())